Optimal. Leaf size=26 \[ \frac {b \log (\tan (c+d x))}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3872, 2834, 2620, 29, 3770} \[ \frac {b \log (\tan (c+d x))}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 2620
Rule 2834
Rule 3770
Rule 3872
Rubi steps
\begin {align*} \int \csc (c+d x) (a+b \sec (c+d x)) \, dx &=-\int (-b-a \cos (c+d x)) \csc (c+d x) \sec (c+d x) \, dx\\ &=a \int \csc (c+d x) \, dx+b \int \csc (c+d x) \sec (c+d x) \, dx\\ &=-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {b \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {b \log (\tan (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.04, size = 63, normalized size = 2.42 \[ \frac {a \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {b (\log (\cos (c+d x))-\log (\sin (c+d x)))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 51, normalized size = 1.96 \[ -\frac {2 \, b \log \left (-\cos \left (d x + c\right )\right ) + {\left (a - b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (a + b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 61, normalized size = 2.35 \[ \frac {{\left (a + b\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 2 \, b \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 35, normalized size = 1.35 \[ \frac {b \ln \left (\tan \left (d x +c \right )\right )}{d}+\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.55, size = 45, normalized size = 1.73 \[ -\frac {{\left (a - b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) - {\left (a + b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) + 2 \, b \log \left (\cos \left (d x + c\right )\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 63, normalized size = 2.42 \[ \frac {\frac {a\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{2}-b\,\ln \left (\cos \left (c+d\,x\right )\right )-\frac {a\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{2}+\frac {b\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{2}+\frac {b\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{2}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \csc {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________